Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Exported Class Names #431

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

dvonthenen
Copy link
Contributor

@dvonthenen dvonthenen commented Jul 9, 2024

Proposed changes

Found a bug with missing export names for classes.

Types of changes

What types of changes does your code introduce to the community Python SDK?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update or tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have lint'ed all of my code using repo standards
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

NA

Summary by CodeRabbit

  • New Features

    • Introduced new clients for REST and WebSocket interactions in speech-to-text and text-to-speech functionalities.
  • Refactor

    • Renamed and reorganized imports for better clarity and consistency.
    • Updated type annotations and references to reflect new naming conventions for REST and WebSocket options.
  • Chores

    • Simplified configuration setup in text-to-speech WebSocket examples.

Copy link
Contributor

coderabbitai bot commented Jul 9, 2024

Walkthrough

The changes primarily involve renaming imports and adding new imports related to speech-to-text and text-to-speech functionalities in various Deepgram client modules. This includes reorganizing imports for REST and WebSocket interactions, updating options and client references, and modifying configuration setups in example scripts.

Changes

File(s) Change Summary
deepgram/__init__.py Renamed and added imports related to speech-to-text and text-to-speech functionalities.
deepgram/client.py Updated imports to include new clients for REST and WebSocket interactions while maintaining backward compatibility.
deepgram/clients/__init__.py Renamed sections for REST and WebSocket to more specific terms like "speech-to-text REST" and updated imports.
deepgram/clients/listen/__init__.py Added imports for ListenRESTOptions, ListenWebSocketOptions, ListenRESTClient, and AsyncListenRESTClient.
deepgram/clients/listen/client.py Updated functionality to include ListenRESTOptionsLatest and ListenWebSocketOptionsLatest.
deepgram/clients/listen/v1/__init__.py Renamed and reorganized imports related to REST and WebSocket clients.
deepgram/clients/listen/v1/rest/... Added ListenRESTOptions and ListenRestSource imports, updated type annotations and references in async and sync clients.
deepgram/clients/speak/v1/websocket/options.py Introduced alias SpeakWebSocketOptions for the SpeakOptions class.
examples/text-to-speech/websocket/.../main.py Removed URL setting from DeepgramClientOptions instantiation and simplified configuration setup.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dvonthenen dvonthenen changed the title [HOLD] Missing Exported Class Names Missing Exported Class Names Jul 9, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f294397 and c5aea05.

Files selected for processing (5)
  • deepgram/init.py (2 hunks)
  • deepgram/client.py (1 hunks)
  • deepgram/clients/init.py (5 hunks)
  • deepgram/clients/listen/init.py (1 hunks)
  • deepgram/clients/listen/client.py (1 hunks)
Additional context used
Learnings (5)
deepgram/clients/listen/__init__.py (7)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/listen/client.py (6)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/__init__.py (7)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
deepgram/__init__.py (8)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
deepgram/client.py (7)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Ruff
deepgram/clients/listen/__init__.py

54-54: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


55-55: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


56-56: .client.ListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


57-57: .client.AsyncListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/__init__.py

36-36: .live.AsyncLiveClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


40-40: .listen.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


40-40: .listen.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


44-44: .listen.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


64-64: .listen.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


97-97: .analyze.SyncAnalyzeResponse imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


103-103: .speak.SpeakOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


109-109: .speak.SpeakWebSocketEvents imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


113-113: .speak.SpeakClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


114-114: .speak.SpeakRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


120-120: .speak.SpeakRESTResponse imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


125-125: .speak.SpeakWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


126-126: .speak.AsyncSpeakWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/__init__.py

46-46: .client.ErrorResponse imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


50-50: .client.LiveClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


50-50: .client.AsyncLiveClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.ListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.AsyncListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


52-52: .client.LiveTranscriptionEvents imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


53-53: .client.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


66-66: .client.PreRecordedClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


66-66: .client.AsyncPreRecordedClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


69-69: .client.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


70-70: .client.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/client.py

36-36: .clients.LiveClient imported but unused

Remove unused import

(F401)


36-36: .clients.AsyncLiveClient imported but unused

Remove unused import

(F401)


38-38: .clients.ListenRESTClient imported but unused

Remove unused import

(F401)


39-39: .clients.AsyncListenRESTClient imported but unused

Remove unused import

(F401)


40-40: .clients.ListenWebSocketClient imported but unused

Remove unused import

(F401)


41-41: .clients.AsyncListenWebSocketClient imported but unused

Remove unused import

(F401)


44-44: .clients.LiveOptions imported but unused

Remove unused import

(F401)


45-45: .clients.LiveTranscriptionEvents imported but unused

Remove unused import

(F401)

Additional comments not posted (17)
deepgram/clients/listen/__init__.py (2)

54-54: Retain unused import for backward compatibility.

The import for ListenRESTClient is flagged as unused by static analysis tools. However, based on previous learnings, unused imports are retained to maintain backward compatibility.

Tools
Ruff

54-54: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


55-55: Retain unused import for backward compatibility.

The import for AsyncListenRESTClient is flagged as unused by static analysis tools. However, based on previous learnings, unused imports are retained to maintain backward compatibility.

Tools
Ruff

55-55: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/client.py (4)

84-84: Assignment looks good.

The assignment of ListenRESTClient to ListenRESTClientLatest aligns with the context of updating to the latest client versions.


85-85: Assignment looks good.

The assignment of AsyncListenRESTClient to AsyncListenRESTClientLatest aligns with the context of updating to the latest client versions.


85-85: Assignment looks good.

The assignment of ListenWebSocketClient to ListenWebSocketClientLatest aligns with the context of updating to the latest client versions.


85-85: Assignment looks good.

The assignment of AsyncListenWebSocketClient to AsyncListenWebSocketClientLatest aligns with the context of updating to the latest client versions.

deepgram/clients/__init__.py (4)

40-40: Retain unused import for backward compatibility.

The import for ListenRESTClient is flagged as unused by static analysis tools. However, based on previous learnings, unused imports are retained to maintain backward compatibility.

Tools
Ruff

40-40: .listen.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


40-40: .listen.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


40-40: Retain unused import for backward compatibility.

The import for AsyncListenRESTClient is flagged as unused by static analysis tools. However, based on previous learnings, unused imports are retained to maintain backward compatibility.

Tools
Ruff

40-40: .listen.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


40-40: .listen.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


60-60: Retain unused import for backward compatibility.

The import for ListenWebSocketClient is flagged as unused by static analysis tools. However, based on previous learnings, unused imports are retained to maintain backward compatibility.


60-60: Retain unused import for backward compatibility.

The import for AsyncListenWebSocketClient is flagged as unused by static analysis tools. However, based on previous learnings, unused imports are retained to maintain backward compatibility.

deepgram/__init__.py (4)

51-51: Retain unused import for backward compatibility.

The import for ListenWebSocketClient is flagged as unused by static analysis tools. However, based on previous learnings, unused imports are retained to maintain backward compatibility.

Tools
Ruff

51-51: .client.ListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.AsyncListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: Retain unused import for backward compatibility.

The import for AsyncListenWebSocketClient is flagged as unused by static analysis tools. However, based on previous learnings, unused imports are retained to maintain backward compatibility.

Tools
Ruff

51-51: .client.ListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.AsyncListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: Retain unused import for backward compatibility.

The import for ListenRESTClient is flagged as unused by static analysis tools. However, based on previous learnings, unused imports are retained to maintain backward compatibility.

Tools
Ruff

67-67: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: Retain unused import for backward compatibility.

The import for AsyncListenRESTClient is flagged as unused by static analysis tools. However, based on previous learnings, unused imports are retained to maintain backward compatibility.

Tools
Ruff

67-67: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/client.py (3)

36-36: Verify the necessity of backward compatibility imports.

The imports for LiveClient and AsyncLiveClient are marked for backward compatibility but are unused according to static analysis.

Ensure that these imports are necessary for maintaining backward compatibility. If not, consider removing them.

Tools
Ruff

36-36: .clients.LiveClient imported but unused

Remove unused import

(F401)


36-36: .clients.AsyncLiveClient imported but unused

Remove unused import

(F401)


38-42: Verify the necessity of new client imports.

The imports for ListenRESTClient, AsyncListenRESTClient, ListenWebSocketClient, and AsyncListenWebSocketClient are added but are unused according to static analysis.

Ensure that these imports are necessary and used within the file. If not, consider removing them.

Tools
Ruff

38-38: .clients.ListenRESTClient imported but unused

Remove unused import

(F401)


39-39: .clients.AsyncListenRESTClient imported but unused

Remove unused import

(F401)


40-40: .clients.ListenWebSocketClient imported but unused

Remove unused import

(F401)


41-41: .clients.AsyncListenWebSocketClient imported but unused

Remove unused import

(F401)


44-45: Verify the necessity of new options and events imports.

The imports for LiveOptions and LiveTranscriptionEvents are added but are unused according to static analysis.

Ensure that these imports are necessary and used within the file. If not, consider removing them.

Tools
Ruff

44-44: .clients.LiveOptions imported but unused

Remove unused import

(F401)


45-45: .clients.LiveTranscriptionEvents imported but unused

Remove unused import

(F401)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c5aea05 and bf3ea99.

Files selected for processing (17)
  • deepgram/init.py (3 hunks)
  • deepgram/client.py (3 hunks)
  • deepgram/clients/init.py (4 hunks)
  • deepgram/clients/listen/init.py (3 hunks)
  • deepgram/clients/listen/client.py (5 hunks)
  • deepgram/clients/listen/v1/init.py (2 hunks)
  • deepgram/clients/listen/v1/rest/init.py (1 hunks)
  • deepgram/clients/listen/v1/rest/options.py (1 hunks)
  • deepgram/clients/listen/v1/websocket/init.py (1 hunks)
  • deepgram/clients/listen/v1/websocket/options.py (1 hunks)
  • deepgram/clients/speak/init.py (1 hunks)
  • deepgram/clients/speak/client.py (2 hunks)
  • deepgram/clients/speak/v1/init.py (1 hunks)
  • deepgram/clients/speak/v1/rest/async_client.py (7 hunks)
  • deepgram/clients/speak/v1/rest/client.py (7 hunks)
  • deepgram/clients/speak/v1/websocket/async_client.py (4 hunks)
  • deepgram/clients/speak/v1/websocket/client.py (4 hunks)
Files skipped from review due to trivial changes (3)
  • deepgram/clients/listen/v1/rest/options.py
  • deepgram/clients/listen/v1/websocket/options.py
  • deepgram/clients/speak/v1/websocket/async_client.py
Files skipped from review as they are similar to previous changes (1)
  • deepgram/clients/listen/client.py
Additional context used
Learnings (11)
deepgram/clients/listen/v1/websocket/__init__.py (2)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/listen/v1/rest/__init__.py (8)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/rest/options.py:12-12
Timestamp: 2024-07-01T19:12:36.972Z
Learning: Unused imports in `deepgram/clients/listen/v1/rest/options.py` are retained to maintain backwards compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:6-6
Timestamp: 2024-07-01T18:18:02.415Z
Learning: Imports for DeepgramClientOptions and ClientOptionsFromEnv in deepgram/clients/listen/__init__.py should not be flagged as unused in reviews.
deepgram/clients/speak/v1/__init__.py (4)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-07-01T19:14:59.869Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.
deepgram/clients/speak/__init__.py (4)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: deepgram/client.py:81-81
Timestamp: 2024-06-27T00:06:01.811Z
Learning: Imports for SpeakStreamClient and AsyncSpeakStreamClient in `deepgram/client.py` are necessary for export purposes and should not be flagged as unused in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
deepgram/clients/listen/__init__.py (9)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/rest/options.py:12-12
Timestamp: 2024-07-01T19:12:36.972Z
Learning: Unused imports in `deepgram/clients/listen/v1/rest/options.py` are retained to maintain backwards compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:6-6
Timestamp: 2024-07-01T18:18:02.415Z
Learning: Imports for DeepgramClientOptions and ClientOptionsFromEnv in deepgram/clients/listen/__init__.py should not be flagged as unused in reviews.
deepgram/clients/listen/v1/__init__.py (9)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/rest/options.py:12-12
Timestamp: 2024-07-01T19:12:36.972Z
Learning: Unused imports in `deepgram/clients/listen/v1/rest/options.py` are retained to maintain backwards compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:6-6
Timestamp: 2024-07-01T18:18:02.415Z
Learning: Imports for DeepgramClientOptions and ClientOptionsFromEnv in deepgram/clients/listen/__init__.py should not be flagged as unused in reviews.
deepgram/clients/speak/client.py (3)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-07-01T19:14:59.869Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.
deepgram/clients/__init__.py (7)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
deepgram/__init__.py (9)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: deepgram/client.py:81-81
Timestamp: 2024-06-27T00:06:01.811Z
Learning: Imports for SpeakStreamClient and AsyncSpeakStreamClient in `deepgram/client.py` are necessary for export purposes and should not be flagged as unused in reviews.
deepgram/client.py (7)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/speak/v1/websocket/client.py (2)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Ruff
deepgram/clients/listen/v1/websocket/__init__.py

7-7: .options.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


7-7: .options.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/v1/rest/__init__.py

8-8: .options.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/v1/__init__.py

6-6: .options.SpeakOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


7-7: .options.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


8-8: .options.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


9-9: .options.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


10-10: .options.SpeakWebSocketSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


11-11: .options.SpeakSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/__init__.py

17-17: .client.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


18-18: .client.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/__init__.py

19-19: .client.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


38-38: .client.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


56-56: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


57-57: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/v1/__init__.py

19-19: .rest.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


19-19: .rest.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


34-34: .websocket.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


34-34: .websocket.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/__init__.py

40-40: .listen.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


40-40: .listen.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


44-44: .listen.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


65-65: .listen.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


105-105: .speak.SpeakOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


106-106: .speak.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


107-107: .speak.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


109-109: .speak.SpeakWebSocketSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


110-110: .speak.SpeakSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


113-113: .speak.SpeakWebSocketEvents imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/__init__.py

50-50: .client.LiveClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


50-50: .client.AsyncLiveClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.ListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.AsyncListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


52-52: .client.LiveTranscriptionEvents imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


53-53: .client.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


53-53: .client.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


66-66: .client.PreRecordedClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


66-66: .client.AsyncPreRecordedClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


69-69: .client.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


97-97: .client.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


98-98: .client.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/client.py

36-36: .clients.LiveClient imported but unused

Remove unused import

(F401)


36-36: .clients.AsyncLiveClient imported but unused

Remove unused import

(F401)


38-38: .clients.ListenRESTClient imported but unused

Remove unused import

(F401)


39-39: .clients.AsyncListenRESTClient imported but unused

Remove unused import

(F401)


40-40: .clients.ListenWebSocketClient imported but unused

Remove unused import

(F401)


41-41: .clients.AsyncListenWebSocketClient imported but unused

Remove unused import

(F401)


44-44: .clients.ListenWebSocketOptions imported but unused

Remove unused import

(F401)


67-67: .clients.ListenRESTOptions imported but unused

Remove unused import

(F401)


99-99: .clients.SpeakRESTOptions imported but unused

Remove unused import

(F401)


100-100: .clients.SpeakWebSocketOptions imported but unused

Remove unused import

(F401)

Additional comments not posted (38)
deepgram/clients/listen/v1/websocket/__init__.py (1)

7-7: Approved: Imports for backward compatibility.

The imports for LiveOptions and ListenWebSocketOptions are retained to maintain backward compatibility.

Tools
Ruff

7-7: .options.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


7-7: .options.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/v1/rest/__init__.py (1)

8-8: Approved: Imports for backward compatibility.

The imports for ListenRESTOptions and PrerecordedOptions are retained to maintain backward compatibility.

Tools
Ruff

8-8: .options.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/v1/__init__.py (1)

6-12: Approved: Imports for backward compatibility.

The imports for SpeakOptions, SpeakRESTOptions, SpeakWebSocketOptions, FileSource, SpeakWebSocketSource, and SpeakSource are retained to maintain backward compatibility.

Tools
Ruff

6-6: .options.SpeakOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


7-7: .options.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


8-8: .options.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


9-9: .options.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


10-10: .options.SpeakWebSocketSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


11-11: .options.SpeakSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/__init__.py (1)

17-18: Approved: Imports for backward compatibility.

The imports for SpeakRESTOptions and SpeakWebSocketOptions are retained to maintain backward compatibility.

Tools
Ruff

17-17: .client.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


18-18: .client.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/__init__.py (3)

19-19: Retain unused imports for backward compatibility.

The import of ListenRESTOptions is flagged as unused by static analysis tools. However, it should be retained for backward compatibility.

Tools
Ruff

19-19: .client.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


38-38: Retain unused imports for backward compatibility.

The imports of ListenWebSocketOptions and LiveOptions are flagged as unused by static analysis tools. However, they should be retained for backward compatibility.

Tools
Ruff

38-38: .client.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


56-57: Retain unused imports for backward compatibility.

The imports of ListenRESTClient and AsyncListenRESTClient are flagged as unused by static analysis tools. However, they should be retained for backward compatibility.

Tools
Ruff

56-56: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


57-57: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/v1/__init__.py (2)

19-19: Retain unused imports for backward compatibility.

The imports of ListenRESTOptions and PrerecordedOptions are flagged as unused by static analysis tools. However, they should be retained for backward compatibility.

Tools
Ruff

19-19: .rest.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


19-19: .rest.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


34-34: Retain unused imports for backward compatibility.

The imports of LiveOptions and ListenWebSocketOptions are flagged as unused by static analysis tools. However, they should be retained for backward compatibility.

Tools
Ruff

34-34: .websocket.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


34-34: .websocket.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/client.py (2)

13-13: Retain unused imports for backward compatibility.

The import of SpeakRESTOptions is flagged as unused by static analysis tools. However, it should be retained for backward compatibility.


14-14: Retain unused imports for backward compatibility.

The import of SpeakWebSocketOptions is flagged as unused by static analysis tools. However, it should be retained for backward compatibility.

deepgram/clients/__init__.py (4)

40-40: Retain unused imports for backward compatibility.

The imports of ListenRESTClient and AsyncListenRESTClient are flagged as unused by static analysis tools. However, they should be retained for backward compatibility.

Tools
Ruff

40-40: .listen.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


40-40: .listen.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


44-44: Retain unused imports for backward compatibility.

The imports of ListenRESTOptions and PrerecordedOptions are flagged as unused by static analysis tools. However, they should be retained for backward compatibility.

Tools
Ruff

44-44: .listen.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


61-61: Retain unused imports for backward compatibility.

The imports of ListenWebSocketClient and AsyncListenWebSocketClient are flagged as unused by static analysis tools. However, they should be retained for backward compatibility.


106-106: Retain unused imports for backward compatibility.

The import of SpeakRESTOptions is flagged as unused by static analysis tools. However, it should be retained for backward compatibility.

Tools
Ruff

106-106: .speak.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/__init__.py (5)

50-51: Retain unused imports for backward compatibility.

The imports for LiveClient, AsyncLiveClient, ListenWebSocketClient, and AsyncListenWebSocketClient are retained for backward compatibility.

Tools
Ruff

50-50: .client.LiveClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


50-50: .client.AsyncLiveClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.ListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.AsyncListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


53-53: Retain unused imports for backward compatibility.

The imports for LiveOptions and ListenWebSocketOptions are retained for backward compatibility.

Tools
Ruff

53-53: .client.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


53-53: .client.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


66-67: Retain unused imports for backward compatibility.

The imports for PreRecordedClient, AsyncPreRecordedClient, ListenRESTClient, and AsyncListenRESTClient are retained for backward compatibility.

Tools
Ruff

66-66: .client.PreRecordedClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


66-66: .client.AsyncPreRecordedClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


69-69: Retain unused imports for backward compatibility.

The imports for ListenRESTOptions and PrerecordedOptions are retained for backward compatibility.

Tools
Ruff

69-69: .client.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


97-98: Retain unused imports for backward compatibility.

The imports for SpeakRESTOptions and SpeakWebSocketOptions are retained for backward compatibility.

Tools
Ruff

97-97: .client.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


98-98: .client.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/v1/rest/client.py (5)

17-17: Ensure correct usage of SpeakRESTOptions.

The import statement for SpeakRESTOptions is correct. Verify that all functions using this option handle it appropriately.

Verification successful

Verified: Correct usage of SpeakRESTOptions.

The import statement for SpeakRESTOptions is correct, and all instances in the codebase handle it appropriately by validating and converting it to a dictionary when necessary.

  • deepgram/clients/speak/v1/rest/client.py
  • deepgram/clients/speak/v1/rest/async_client.py
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify functions that use `SpeakRESTOptions` handle it correctly.

# Test: Search for functions using `SpeakRESTOptions`. Expect: Correct handling of `SpeakRESTOptions`.
rg --type python -A 5 $'SpeakRESTOptions'

Length of output: 71


Script:

#!/bin/bash
# Description: Verify functions that use `SpeakRESTOptions` handle it correctly.

# Test: Search for functions using `SpeakRESTOptions`. Expect: Correct handling of `SpeakRESTOptions`.
rg -t py -A 5 'SpeakRESTOptions'

Length of output: 11382


73-81: Ensure correct handling of SpeakRESTOptions validation.

The validation of SpeakRESTOptions using the check method is correct. Ensure all necessary validations are in place.

Verification successful

Validation for SpeakRESTOptions is correctly implemented.

The check method for SpeakRESTOptions is being used for validation in deepgram/clients/speak/v1/rest/client.py, ensuring that the necessary validations are in place.

  • deepgram/clients/speak/v1/rest/client.py: Validation logic using options.check.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the validation of `SpeakRESTOptions` using the `check` method.

# Test: Search for the `check` method usage. Expect: Correct validation of `SpeakRESTOptions`.
rg --type python -A 5 'options.check'

Length of output: 68


Script:

#!/bin/bash
# Description: Verify the validation of `SpeakRESTOptions` using the `check` method.

# Test: Search for the `check` method usage. Expect: Correct validation of `SpeakRESTOptions`.
rg --glob '*.py' -A 5 'options.check'

Length of output: 14752


Line range hint 147-158:
Ensure correct usage of SpeakRESTOptions in save method.

The save method uses SpeakRESTOptions. Ensure the method handles the options correctly.

Verification successful

Verified: The save method handles SpeakRESTOptions correctly.

The save method passes the options parameter to the stream method, which validates and converts SpeakRESTOptions as needed, ensuring proper handling.

  • deepgram/clients/speak/v1/rest/client.py
    • save method
    • stream method
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the `save` method handles `SpeakRESTOptions` correctly.

# Test: Search for the `save` method. Expect: Correct handling of `SpeakRESTOptions`.
rg --type python -A 20 'def save'

Length of output: 66


Script:

#!/bin/bash
# Description: Verify the `save` method handles `SpeakRESTOptions` correctly.

# Search for the `save` method within the specified file.
ast-grep --lang python --pattern $'def save($_, $_, $_, $_, $_, $_):\n    $$$' deepgram/clients/speak/v1/rest/client.py

Length of output: 119


Script:

#!/bin/bash
# Description: Verify the `save` method handles `SpeakRESTOptions` correctly.

# Search for the `save` method within the specified file and provide more context lines.
rg 'def save' -A 50 deepgram/clients/speak/v1/rest/client.py

Length of output: 1827


Script:

#!/bin/bash
# Description: Verify the `stream` method handles `SpeakRESTOptions` correctly.

# Search for the `stream` method within the specified file and provide more context lines.
rg 'def stream' -A 50 deepgram/clients/speak/v1/rest/client.py

Length of output: 2163


126-126: Ensure correct usage of SpeakRESTOptions in file method.

The file method uses SpeakRESTOptions. Ensure the method handles the options correctly.

Verification successful

The file method correctly handles SpeakRESTOptions by passing it to the save method, which ensures proper processing through the stream method.

  • The stream method checks the validity of SpeakRESTOptions and converts it to a dictionary for further processing.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the `file` method handles `SpeakRESTOptions` correctly.

# Test: Search for the `file` method. Expect: Correct handling of `SpeakRESTOptions`.
rg --type python -A 20 'def file'

Length of output: 66


Script:

#!/bin/bash
# Description: Verify the `file` method handles `SpeakRESTOptions` correctly.

# Search for the `file` method in the specified file.
rg 'def file' deepgram/clients/speak/v1/rest/client.py -A 20

Length of output: 636


Script:

#!/bin/bash
# Description: Verify the `save` method handles `SpeakRESTOptions` correctly.

# Search for the `save` method in the specified file.
rg 'def save' deepgram/clients/speak/v1/rest/client.py -A 20

Length of output: 967


Script:

#!/bin/bash
# Description: Inspect the implementation of the `save` method to verify the handling of `SpeakRESTOptions`.

# Search for the full implementation of the `save` method.
rg 'def save' deepgram/clients/speak/v1/rest/client.py -A 50

Length of output: 1827


Script:

#!/bin/bash
# Description: Inspect the implementation of the `stream` method to verify the handling of `SpeakRESTOptions`.

# Search for the implementation of the `stream` method.
rg 'def stream' deepgram/clients/speak/v1/rest/client.py -A 50

Length of output: 2163


Line range hint 40-51:
Ensure correct handling of SpeakRESTOptions in stream method.

The stream method uses SpeakRESTOptions. Ensure the method handles the options correctly, including validation and conversion to a dictionary.

deepgram/clients/speak/v1/rest/async_client.py (5)

18-18: Ensure correct usage of SpeakRESTOptions.

The import statement for SpeakRESTOptions is correct. Verify that all functions using this option handle it appropriately.

Verification successful

Usage of SpeakRESTOptions is correctly handled.

The functions using SpeakRESTOptions in deepgram/clients/speak/v1/rest/async_client.py handle it appropriately by including type hints, validating it with the check method, and converting it to a dictionary when necessary.

  • deepgram/clients/speak/v1/rest/async_client.py: Multiple instances verified.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify functions that use `SpeakRESTOptions` handle it correctly.

# Test: Search for functions using `SpeakRESTOptions`. Expect: Correct handling of `SpeakRESTOptions`.
rg --type python -A 5 $'SpeakRESTOptions'

Length of output: 71


Script:

#!/bin/bash
# Description: Verify functions that use `SpeakRESTOptions` handle it correctly.

# Test: Search for functions using `SpeakRESTOptions`. Expect: Correct handling of `SpeakRESTOptions`.
rg 'SpeakRESTOptions' -A 5

Length of output: 11376


74-82: Ensure correct handling of SpeakRESTOptions validation.

The validation of SpeakRESTOptions using the check method is correct. Ensure all necessary validations are in place.

Verification successful

Validation of SpeakRESTOptions is correctly implemented.

The check method is consistently used for validating SpeakRESTOptions across the codebase, including in deepgram/clients/speak/v1/rest/async_client.py. This ensures the necessary validations are in place.

  • deepgram/clients/speak/v1/rest/async_client.py
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the validation of `SpeakRESTOptions` using the `check` method.

# Test: Search for the `check` method usage. Expect: Correct validation of `SpeakRESTOptions`.
rg --type python -A 5 'options.check'

Length of output: 68


Script:

#!/bin/bash
# Description: Verify the validation of `SpeakRESTOptions` using the `check` method.

# Test: Search for the `check` method usage. Expect: Correct validation of `SpeakRESTOptions`.
rg -t py -A 5 'options.check'

Length of output: 14744


Line range hint 41-52:
Ensure correct handling of SpeakRESTOptions in stream method.

The stream method uses SpeakRESTOptions. Ensure the method handles the options correctly, including validation and conversion to a dictionary.

Verification successful

Verified: The stream method correctly handles SpeakRESTOptions, including validation and conversion to a dictionary.

  • deepgram/clients/speak/v1/rest/async_client.py
  • deepgram/clients/speak/v1/rest/client.py
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the `stream` method handles `SpeakRESTOptions` correctly.

# Test: Search for the `stream` method. Expect: Correct handling of `SpeakRESTOptions`.
rg --type python -A 20 'def stream'

Length of output: 68


Script:

#!/bin/bash
# Description: Verify the `stream` method handles `SpeakRESTOptions` correctly.

# Test: Search for the `stream` method. Expect: Correct handling of `SpeakRESTOptions`.
rg 'def stream' -A 20

Length of output: 3684


Script:

#!/bin/bash
# Description: Capture the complete implementation of the `stream` method in the specified files.

# Test: Search for the full `stream` method implementations.
rg 'def stream' -A 50 deepgram/clients/speak/v1/rest/async_client.py
rg 'def stream' -A 50 deepgram/clients/speak/v1/rest/client.py

Length of output: 4354


126-126: Ensure correct usage of SpeakRESTOptions in file method.

The file method uses SpeakRESTOptions. Ensure the method handles the options correctly.

Verification successful

Verified: Correct handling of SpeakRESTOptions in the file method.

The file method, through its use of the save method, correctly handles SpeakRESTOptions by ensuring their validity and converting them to a dictionary for further processing.

  • deepgram/clients/speak/v1/rest/async_client.py: file, save, and stream methods.
  • deepgram/clients/speak/v1/rest/client.py: file, save, and stream methods.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the `file` method handles `SpeakRESTOptions` correctly.

# Test: Search for the `file` method. Expect: Correct handling of `SpeakRESTOptions`.
rg --type python -A 20 'def file'

Length of output: 66


Script:

#!/bin/bash
# Description: Verify the `file` method handles `SpeakRESTOptions` correctly.

# Test: Search for the `file` method. Expect: Correct handling of `SpeakRESTOptions`.
rg --type py -A 20 'def file'

Length of output: 3036


Script:

#!/bin/bash
# Description: Verify the `save` method handles `SpeakRESTOptions` correctly, as used by the `file` method.

# Test: Search for the `save` method implementation. Expect: Correct handling of `SpeakRESTOptions`.
rg --type py -A 20 'def save'

Length of output: 3698


Script:

#!/bin/bash
# Description: Verify the `save` method handles `SpeakRESTOptions` correctly by examining its full implementation.

# Test: Search for the full implementation of the `save` method.
rg --type py -A 50 'def save'

Length of output: 8097


Script:

#!/bin/bash
# Description: Verify the `stream` method handles `SpeakRESTOptions` correctly by examining its full implementation.

# Test: Search for the full implementation of the `stream` method.
rg --type py -A 50 'def stream'

Length of output: 8743


Line range hint 147-158:
Ensure correct usage of SpeakRESTOptions in save method.

The save method uses SpeakRESTOptions. Ensure the method handles the options correctly.

Verification successful

SpeakRESTOptions is handled correctly in the save method.

The save method correctly processes the SpeakRESTOptions parameter by validating it with the check() method and converting it to a dictionary using the to_dict() method. This ensures proper handling of the SpeakRESTOptions.

  • deepgram/clients/speak/v1/rest/client.py
  • deepgram/clients/speak/v1/rest/async_client.py
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the `save` method handles `SpeakRESTOptions` correctly.

# Test: Search for the `save` method. Expect: Correct handling of `SpeakRESTOptions`.
rg --type python -A 20 'def save'

Length of output: 66


Script:

#!/bin/bash
# Description: Verify the `save` method handles `SpeakRESTOptions` correctly.

# Test: Search for the `save` method. Expect: Correct handling of `SpeakRESTOptions`.
rg --glob '*.py' -A 20 'def save'

Length of output: 3702


Script:

#!/bin/bash
# Description: Extract the complete implementation of the `save` method in both client.py and async_client.py to verify correct handling of `SpeakRESTOptions`.

# Extract the `save` method from client.py
rg --glob '*.py' -A 50 'def save' deepgram/clients/speak/v1/rest/client.py

# Extract the `save` method from async_client.py
rg --glob '*.py' -A 50 'def save' deepgram/clients/speak/v1/rest/async_client.py

Length of output: 3734


Script:

#!/bin/bash
# Description: Extract the complete implementation of the `stream` method in both client.py and async_client.py to verify correct handling of `SpeakRESTOptions`.

# Extract the `stream` method from client.py
rg --glob '*.py' -A 50 'def stream' deepgram/clients/speak/v1/rest/client.py

# Extract the `stream` method from async_client.py
rg --glob '*.py' -A 50 'def stream' deepgram/clients/speak/v1/rest/async_client.py

Length of output: 4382

deepgram/client.py (4)

36-42: Retain unused imports for backward compatibility.

The imports for LiveClient, AsyncLiveClient, ListenRESTClient, AsyncListenRESTClient, ListenWebSocketClient, and AsyncListenWebSocketClient are retained for backward compatibility.

Tools
Ruff

36-36: .clients.LiveClient imported but unused

Remove unused import

(F401)


36-36: .clients.AsyncLiveClient imported but unused

Remove unused import

(F401)


38-38: .clients.ListenRESTClient imported but unused

Remove unused import

(F401)


39-39: .clients.AsyncListenRESTClient imported but unused

Remove unused import

(F401)


40-40: .clients.ListenWebSocketClient imported but unused

Remove unused import

(F401)


41-41: .clients.AsyncListenWebSocketClient imported but unused

Remove unused import

(F401)


44-44: Retain unused imports for backward compatibility.

The imports for ListenWebSocketOptions, LiveOptions, and LiveTranscriptionEvents are retained for backward compatibility.

Tools
Ruff

44-44: .clients.ListenWebSocketOptions imported but unused

Remove unused import

(F401)


67-67: Retain unused imports for backward compatibility.

The imports for ListenRESTOptions and PrerecordedOptions are retained for backward compatibility.

Tools
Ruff

67-67: .clients.ListenRESTOptions imported but unused

Remove unused import

(F401)


99-100: Retain unused imports for backward compatibility.

The imports for SpeakRESTOptions and SpeakWebSocketOptions are retained for backward compatibility.

Tools
Ruff

99-99: .clients.SpeakRESTOptions imported but unused

Remove unused import

(F401)


100-100: .clients.SpeakWebSocketOptions imported but unused

Remove unused import

(F401)

deepgram/clients/speak/v1/websocket/client.py (4)

29-29: Import addition approved.

The inclusion of SpeakWebSocketOptions is appropriate and aligns with the changes mentioned in the summary. Ensure that this import is used correctly in the class.


84-84: Ensure SpeakWebSocketOptions is correctly handled.

The start method now includes SpeakWebSocketOptions. Ensure that the options are correctly validated and converted within the method.


100-100: Validation of SpeakWebSocketOptions is appropriate.

The check for SpeakWebSocketOptions using options.check() is valid and ensures the options are correctly set.


118-119: Conversion of SpeakWebSocketOptions to dictionary is correct.

The conversion of SpeakWebSocketOptions to a dictionary using options.to_dict() is correctly implemented.

@dvonthenen dvonthenen force-pushed the missing-classes-in-init branch 2 times, most recently from 6f2e190 to d7b8cd1 Compare July 10, 2024 17:12
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Outside diff range, codebase verification and nitpick comments (11)
deepgram/clients/speak/v1/rest/async_client.py (3)

52-52: Improve parameter documentation.

The options parameter documentation should mention that it can accept a dictionary or SpeakRESTOptions.

- options (SpeakRESTOptions): Additional options for the ingest (default is None).
+ options (Optional[Union[Dict, SpeakRESTOptions]]): Additional options for the ingest (default is None).

81-82: Improve logging message.

The logging message "SpeakRESTOptions switching class -> dict" could be more informative.

- self._logger.info("SpeakRESTOptions switching class -> dict")
+ self._logger.info("Converting SpeakRESTOptions to dictionary")

158-158: Improve parameter documentation.

The options parameter documentation should mention that it can accept a dictionary or SpeakRESTOptions.

- options (SpeakRESTOptions): Additional options for the ingest (default is None).
+ options (Optional[Union[Dict, SpeakRESTOptions]]): Additional options for the ingest (default is None).
deepgram/clients/listen/v1/rest/client.py (4)

55-55: Improve parameter documentation.

The options parameter documentation should mention that it can accept a dictionary or ListenRESTOptions.

- options (ListenRESTOptions): Additional options for the transcription (default is None).
+ options (Optional[Union[Dict, ListenRESTOptions]]): Additional options for the transcription (default is None).

97-98: Improve logging message.

The logging message "ListenRESTOptions switching class -> dict" could be more informative.

- self._logger.info("ListenRESTOptions switching class -> dict")
+ self._logger.info("Converting ListenRESTOptions to dictionary")

201-201: Improve parameter documentation.

The options parameter documentation should mention that it can accept a dictionary or ListenRESTOptions.

- options (ListenRESTOptions): Additional options for the transcription (default is None).
+ options (Optional[Union[Dict, ListenRESTOptions]]): Additional options for the transcription (default is None).

245-246: Improve logging message.

The logging message "ListenRESTOptions switching class -> dict" could be more informative.

- self._logger.info("ListenRESTOptions switching class -> dict")
+ self._logger.info("Converting ListenRESTOptions to dictionary")
deepgram/clients/listen/v1/rest/async_client.py (4)

55-55: Improve parameter documentation.

The options parameter documentation should mention that it can accept a dictionary or ListenRESTOptions.

- options (ListenRESTOptions): Additional options for the transcription (default is None).
+ options (Optional[Union[Dict, ListenRESTOptions]]): Additional options for the transcription (default is None).

97-98: Improve logging message.

The logging message "ListenRESTOptions switching class -> dict" could be more informative.

- self._logger.info("ListenRESTOptions switching class -> dict")
+ self._logger.info("Converting ListenRESTOptions to dictionary")

201-201: Improve parameter documentation.

The options parameter documentation should mention that it can accept a dictionary or ListenRESTOptions.

- options (ListenRESTOptions): Additional options for the transcription (default is None).
+ options (Optional[Union[Dict, ListenRESTOptions]]): Additional options for the transcription (default is None).

245-246: Improve logging message.

The logging message "ListenRESTOptions switching class -> dict" could be more informative.

- self._logger.info("ListenRESTOptions switching class -> dict")
+ self._logger.info("Converting ListenRESTOptions to dictionary")
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bf3ea99 and 2862f0b.

Files selected for processing (29)
  • deepgram/init.py (3 hunks)
  • deepgram/client.py (3 hunks)
  • deepgram/clients/init.py (4 hunks)
  • deepgram/clients/listen/init.py (3 hunks)
  • deepgram/clients/listen/client.py (5 hunks)
  • deepgram/clients/listen/v1/init.py (2 hunks)
  • deepgram/clients/listen/v1/rest/init.py (1 hunks)
  • deepgram/clients/listen/v1/rest/async_client.py (17 hunks)
  • deepgram/clients/listen/v1/rest/client.py (17 hunks)
  • deepgram/clients/listen/v1/rest/options.py (1 hunks)
  • deepgram/clients/listen/v1/websocket/init.py (1 hunks)
  • deepgram/clients/listen/v1/websocket/async_client.py (4 hunks)
  • deepgram/clients/listen/v1/websocket/client.py (4 hunks)
  • deepgram/clients/listen/v1/websocket/options.py (1 hunks)
  • deepgram/clients/speak/init.py (1 hunks)
  • deepgram/clients/speak/client.py (2 hunks)
  • deepgram/clients/speak/v1/init.py (1 hunks)
  • deepgram/clients/speak/v1/options.py (1 hunks)
  • deepgram/clients/speak/v1/rest/init.py (1 hunks)
  • deepgram/clients/speak/v1/rest/async_client.py (7 hunks)
  • deepgram/clients/speak/v1/rest/client.py (7 hunks)
  • deepgram/clients/speak/v1/rest/helpers.py (1 hunks)
  • deepgram/clients/speak/v1/rest/options.py (1 hunks)
  • deepgram/clients/speak/v1/websocket/init.py (1 hunks)
  • deepgram/clients/speak/v1/websocket/async_client.py (4 hunks)
  • deepgram/clients/speak/v1/websocket/client.py (4 hunks)
  • deepgram/clients/speak/v1/websocket/options.py (1 hunks)
  • examples/text-to-speech/websocket/async_interactive/main.py (1 hunks)
  • examples/text-to-speech/websocket/interactive/main.py (1 hunks)
Files skipped from review due to trivial changes (4)
  • deepgram/clients/speak/v1/rest/helpers.py
  • deepgram/clients/speak/v1/rest/options.py
  • deepgram/clients/speak/v1/websocket/options.py
  • examples/text-to-speech/websocket/interactive/main.py
Files skipped from review as they are similar to previous changes (7)
  • deepgram/clients/listen/client.py
  • deepgram/clients/listen/v1/rest/options.py
  • deepgram/clients/listen/v1/websocket/options.py
  • deepgram/clients/speak/client.py
  • deepgram/clients/speak/v1/rest/client.py
  • deepgram/clients/speak/v1/websocket/async_client.py
  • deepgram/clients/speak/v1/websocket/client.py
Additional context used
Learnings (13)
deepgram/clients/speak/v1/websocket/__init__.py (4)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-07-01T19:14:59.869Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/listen/v1/websocket/__init__.py (2)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/listen/v1/rest/__init__.py (8)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/rest/options.py:12-12
Timestamp: 2024-07-01T19:12:36.972Z
Learning: Unused imports in `deepgram/clients/listen/v1/rest/options.py` are retained to maintain backwards compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:6-6
Timestamp: 2024-07-01T18:18:02.415Z
Learning: Imports for DeepgramClientOptions and ClientOptionsFromEnv in deepgram/clients/listen/__init__.py should not be flagged as unused in reviews.
deepgram/clients/speak/__init__.py (1)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/speak/v1/__init__.py (5)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-07-01T19:14:59.869Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/rest/options.py:12-12
Timestamp: 2024-07-01T19:12:36.972Z
Learning: Unused imports in `deepgram/clients/listen/v1/rest/options.py` are retained to maintain backwards compatibility.
deepgram/clients/listen/__init__.py (9)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/rest/options.py:12-12
Timestamp: 2024-07-01T19:12:36.972Z
Learning: Unused imports in `deepgram/clients/listen/v1/rest/options.py` are retained to maintain backwards compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:6-6
Timestamp: 2024-07-01T18:18:02.415Z
Learning: Imports for DeepgramClientOptions and ClientOptionsFromEnv in deepgram/clients/listen/__init__.py should not be flagged as unused in reviews.
deepgram/clients/listen/v1/__init__.py (8)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/rest/options.py:12-12
Timestamp: 2024-07-01T19:12:36.972Z
Learning: Unused imports in `deepgram/clients/listen/v1/rest/options.py` are retained to maintain backwards compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/__init__.py (8)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
deepgram/__init__.py (9)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: deepgram/client.py:81-81
Timestamp: 2024-06-27T00:06:01.811Z
Learning: Imports for SpeakStreamClient and AsyncSpeakStreamClient in `deepgram/client.py` are necessary for export purposes and should not be flagged as unused in reviews.
deepgram/client.py (7)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:37-38
Timestamp: 2024-07-01T19:13:29.909Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:54-55
Timestamp: 2024-07-01T19:13:11.612Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:10-13
Timestamp: 2024-07-01T19:14:11.334Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/listen/v1/rest/client.py (1)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/rest/options.py:12-12
Timestamp: 2024-07-01T19:12:36.972Z
Learning: Unused imports in `deepgram/clients/listen/v1/rest/options.py` are retained to maintain backwards compatibility.
deepgram/clients/listen/v1/websocket/client.py (1)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/listen/v1/websocket/async_client.py (1)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Ruff
deepgram/clients/speak/v1/rest/__init__.py

9-9: .options.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


10-10: .options.SpeakSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


11-11: .options.SpeakRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


12-12: .options.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/v1/websocket/__init__.py

17-17: .options.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/v1/websocket/__init__.py

7-7: .options.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


7-7: .options.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/v1/rest/__init__.py

8-8: .options.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


9-9: .options.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


10-10: .options.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


11-11: .options.UrlSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


12-12: .options.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


13-13: .options.PrerecordedSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


14-14: .options.ListenRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/__init__.py

17-17: .client.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


18-18: .client.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


19-19: .client.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


20-20: .client.SpeakRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/v1/__init__.py

6-6: .options.SpeakOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


9-9: .rest.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


10-10: .rest.SpeakRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


11-11: .rest.SpeakSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


12-12: .rest.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


15-15: .websocket.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/__init__.py

19-19: .client.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


20-20: .client.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


21-21: .client.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


22-22: .client.UrlSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


23-23: .client.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


24-24: .client.PrerecordedSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


25-25: .client.ListenRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


39-39: .client.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


57-57: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


58-58: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/v1/__init__.py

19-19: .rest.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


19-19: .rest.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


21-21: .rest.UrlSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


22-22: .rest.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


23-23: .rest.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


24-24: .rest.PrerecordedSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


25-25: .rest.ListenRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


35-35: .websocket.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


35-35: .websocket.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/__init__.py

40-40: .listen.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


40-40: .listen.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


44-44: .listen.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


45-45: .listen.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


46-46: .listen.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


49-49: .listen.PrerecordedSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


50-50: .listen.ListenRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


66-66: .listen.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


106-106: .speak.SpeakOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


107-107: .speak.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


108-108: .speak.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


110-110: .speak.SpeakRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


111-111: .speak.SpeakSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


114-114: .speak.SpeakWebSocketEvents imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/__init__.py

50-50: .client.LiveClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


50-50: .client.AsyncLiveClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.ListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.AsyncListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


52-52: .client.LiveTranscriptionEvents imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


53-53: .client.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


53-53: .client.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


66-66: .client.PreRecordedClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


66-66: .client.AsyncPreRecordedClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


69-69: .client.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


70-70: .client.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


71-71: .client.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


72-72: .client.PrerecordedSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


73-73: .client.ListenRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


98-98: .client.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


99-99: .client.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


101-101: .client.SpeakRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/client.py

36-36: .clients.LiveClient imported but unused

Remove unused import

(F401)


36-36: .clients.AsyncLiveClient imported but unused

Remove unused import

(F401)


38-38: .clients.ListenRESTClient imported but unused

Remove unused import

(F401)


39-39: .clients.AsyncListenRESTClient imported but unused

Remove unused import

(F401)


40-40: .clients.ListenWebSocketClient imported but unused

Remove unused import

(F401)


41-41: .clients.AsyncListenWebSocketClient imported but unused

Remove unused import

(F401)


44-44: .clients.ListenWebSocketOptions imported but unused

Remove unused import

(F401)


67-67: .clients.ListenRESTOptions imported but unused

Remove unused import

(F401)


68-68: .clients.PrerecordedOptions imported but unused

Remove unused import

(F401)


69-69: .clients.PreRecordedStreamSource imported but unused

Remove unused import

(F401)


70-70: .clients.PrerecordedSource imported but unused

Remove unused import

(F401)


71-71: .clients.ListenRestSource imported but unused

Remove unused import

(F401)


100-100: .clients.SpeakRESTOptions imported but unused

Remove unused import

(F401)


101-101: .clients.SpeakWebSocketOptions imported but unused

Remove unused import

(F401)


103-103: .clients.SpeakRestSource imported but unused

Remove unused import

(F401)

deepgram/clients/listen/v1/websocket/client.py

30-30: .options.LiveOptions imported but unused

Remove unused import: .options.LiveOptions

(F401)

deepgram/clients/listen/v1/websocket/async_client.py

30-30: .options.LiveOptions imported but unused

Remove unused import: .options.LiveOptions

(F401)

Additional comments not posted (63)
deepgram/clients/speak/v1/rest/__init__.py (1)

8-13: LGTM!

The imports are consistent with the user's preference to retain them for backward compatibility.

Tools
Ruff

9-9: .options.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


10-10: .options.SpeakSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


11-11: .options.SpeakRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


12-12: .options.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/v1/websocket/__init__.py (1)

17-17: LGTM!

The imports are consistent with the user's preference to retain them for backward compatibility.

Tools
Ruff

17-17: .options.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/v1/websocket/__init__.py (1)

7-7: LGTM!

The imports are consistent with the user's preference to retain them for backward compatibility.

Tools
Ruff

7-7: .options.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


7-7: .options.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/v1/rest/__init__.py (1)

8-14: LGTM!

The imports are consistent with the user's preference to retain them for backward compatibility.

Tools
Ruff

8-8: .options.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


9-9: .options.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


10-10: .options.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


11-11: .options.UrlSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


12-12: .options.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


13-13: .options.PrerecordedSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


14-14: .options.ListenRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/__init__.py (3)

17-17: Retain unused import for backward compatibility.

The import of SpeakRESTOptions is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

17-17: .client.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


18-18: Retain unused import for backward compatibility.

The import of SpeakWebSocketOptions is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

18-18: .client.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


20-20: Retain unused import for backward compatibility.

The import of SpeakRestSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

20-20: .client.SpeakRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/v1/__init__.py (6)

6-6: Retain unused import for backward compatibility.

The import of SpeakOptions is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

6-6: .options.SpeakOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


9-9: Retain unused import for backward compatibility.

The import of SpeakRESTOptions is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

9-9: .rest.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


10-10: Retain unused import for backward compatibility.

The import of SpeakRestSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

10-10: .rest.SpeakRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


11-11: Retain unused import for backward compatibility.

The import of SpeakSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

11-11: .rest.SpeakSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


12-12: Retain unused import for backward compatibility.

The import of FileSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

12-12: .rest.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


15-15: Retain unused import for backward compatibility.

The import of SpeakWebSocketOptions is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

15-15: .websocket.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/__init__.py (10)

19-19: Retain unused import for backward compatibility.

The import of ListenRESTOptions is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

19-19: .client.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


20-20: Retain unused import for backward compatibility.

The import of PrerecordedOptions is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

20-20: .client.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


21-21: Retain unused import for backward compatibility.

The import of PreRecordedStreamSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

21-21: .client.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


22-22: Retain unused import for backward compatibility.

The import of UrlSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

22-22: .client.UrlSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


23-23: Retain unused import for backward compatibility.

The import of FileSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

23-23: .client.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


24-24: Retain unused import for backward compatibility.

The import of PrerecordedSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

24-24: .client.PrerecordedSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


25-25: Retain unused import for backward compatibility.

The import of ListenRestSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

25-25: .client.ListenRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


39-39: Retain unused import for backward compatibility.

The import of ListenWebSocketOptions is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

39-39: .client.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


57-57: Retain unused import for backward compatibility.

The import of ListenRESTClient is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

57-57: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


58-58: Retain unused import for backward compatibility.

The import of AsyncListenRESTClient is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

58-58: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/listen/v1/__init__.py (7)

19-19: Retain unused import for backward compatibility.

The import of ListenRESTOptions is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

19-19: .rest.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


19-19: .rest.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


19-19: Retain unused import for backward compatibility.

The import of PrerecordedOptions is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

19-19: .rest.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


19-19: .rest.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


21-21: Retain unused import for backward compatibility.

The import of UrlSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

21-21: .rest.UrlSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


22-22: Retain unused import for backward compatibility.

The import of FileSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

22-22: .rest.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


23-23: Retain unused import for backward compatibility.

The import of PreRecordedStreamSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

23-23: .rest.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


24-24: Retain unused import for backward compatibility.

The import of PrerecordedSource is retained to ensure backward compatibility, as per previous learnings.

Tools
Ruff

24-24: .rest.PrerecordedSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


25-25: Retain unused import for backward compatibility.

The import of ListenRestSource is retained

Tools
Ruff

25-25: .rest.ListenRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/v1/options.py (3)

68-68: Alias SpeakOptions to SpeakRESTOptions.

This aliasing is appropriate and aligns with the new naming conventions.


70-70: Define SpeakSource type.

The union type SpeakSource is appropriately defined.


71-71: Alias SpeakSource to SpeakRestSource.

This aliasing is appropriate and aligns with the new naming conventions.

deepgram/clients/__init__.py (6)

40-40: Import ListenRESTClient and AsyncListenRESTClient.

These imports align with the new naming conventions and the reorganization of the codebase.

Tools
Ruff

40-40: .listen.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


40-40: .listen.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


44-50: Import various options and sources for ListenRESTClient.

These imports align with the new naming conventions and the reorganization of the codebase.

Tools
Ruff

44-44: .listen.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


45-45: .listen.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


46-46: .listen.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


49-49: .listen.PrerecordedSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


50-50: .listen.ListenRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


62-62: Import ListenWebSocketClient and AsyncListenWebSocketClient.

These imports align with the new naming conventions and the reorganization of the codebase.


66-66: Import ListenWebSocketOptions and LiveOptions.

These imports align with the new naming conventions and the reorganization of the codebase.

Tools
Ruff

66-66: .listen.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


107-110: Import various options and sources for SpeakRESTClient.

These imports align with the new naming conventions and the reorganization of the codebase.

Tools
Ruff

107-107: .speak.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


108-108: .speak.SpeakWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


110-110: .speak.SpeakRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


128-128: Import SpeakWebSocketClient and AsyncSpeakWebSocketClient.

These imports align with the new naming conventions and the reorganization of the codebase.

examples/text-to-speech/websocket/async_interactive/main.py (1)

21-21: Modify DeepgramClientOptions instantiation.

The removal of the URL parameter is appropriate and simplifies the configuration.

deepgram/__init__.py (4)

51-51: Import ListenWebSocketClient and AsyncListenWebSocketClient.

These imports align with the new naming conventions and the reorganization of the codebase.

Tools
Ruff

51-51: .client.ListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


51-51: .client.AsyncListenWebSocketClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


53-53: Import LiveOptions and ListenWebSocketOptions.

These imports align with the new naming conventions and the reorganization of the codebase.

Tools
Ruff

53-53: .client.LiveOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


53-53: .client.ListenWebSocketOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: Import ListenRESTClient and AsyncListenRESTClient.

These imports align with the new naming conventions and the reorganization of the codebase.

Tools
Ruff

67-67: .client.ListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


67-67: .client.AsyncListenRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


69-73: Import various options and sources for ListenRESTClient.

These imports align with the new naming conventions and the reorganization of the codebase.

Tools
Ruff

69-69: .client.ListenRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


70-70: .client.PrerecordedOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


71-71: .client.PreRecordedStreamSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


72-72: .client.PrerecordedSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


73-73: .client.ListenRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/v1/rest/async_client.py (3)

41-41: Verify the correct handling of SpeakRESTOptions.

Ensure that the SpeakRESTOptions parameter is handled correctly, particularly the check method.


126-126: Verify the correct handling of SpeakRESTOptions.

Ensure that the SpeakRESTOptions parameter is handled correctly.


147-147: Verify the correct handling of SpeakRESTOptions.

Ensure that the SpeakRESTOptions parameter is handled correctly, particularly the check method.

deepgram/client.py (6)

36-42: Retain unused imports for backward compatibility.

Although static analysis hints indicate some unused imports, retain them to maintain backward compatibility.

Tools
Ruff

36-36: .clients.LiveClient imported but unused

Remove unused import

(F401)


36-36: .clients.AsyncLiveClient imported but unused

Remove unused import

(F401)


38-38: .clients.ListenRESTClient imported but unused

Remove unused import

(F401)


39-39: .clients.AsyncListenRESTClient imported but unused

Remove unused import

(F401)


40-40: .clients.ListenWebSocketClient imported but unused

Remove unused import

(F401)


41-41: .clients.AsyncListenWebSocketClient imported but unused

Remove unused import

(F401)


67-71: Retain unused imports for backward compatibility.

Although static analysis hints indicate some unused imports, retain them to maintain backward compatibility.

Tools
Ruff

67-67: .clients.ListenRESTOptions imported but unused

Remove unused import

(F401)


68-68: .clients.PrerecordedOptions imported but unused

Remove unused import

(F401)


69-69: .clients.PreRecordedStreamSource imported but unused

Remove unused import

(F401)


70-70: .clients.PrerecordedSource imported but unused

Remove unused import

(F401)


71-71: .clients.ListenRestSource imported but unused

Remove unused import

(F401)


100-103: Retain unused imports for backward compatibility.

Although static analysis hints indicate some unused imports, retain them to maintain backward compatibility.

Tools
Ruff

100-100: .clients.SpeakRESTOptions imported but unused

Remove unused import

(F401)


101-101: .clients.SpeakWebSocketOptions imported but unused

Remove unused import

(F401)


103-103: .clients.SpeakRestSource imported but unused

Remove unused import

(F401)


36-42: Verify the correct handling of new clients and options.

Ensure that the methods correctly handle the new Listen and Speak related clients and options.

Tools
Ruff

36-36: .clients.LiveClient imported but unused

Remove unused import

(F401)


36-36: .clients.AsyncLiveClient imported but unused

Remove unused import

(F401)


38-38: .clients.ListenRESTClient imported but unused

Remove unused import

(F401)


39-39: .clients.AsyncListenRESTClient imported but unused

Remove unused import

(F401)


40-40: .clients.ListenWebSocketClient imported but unused

Remove unused import

(F401)


41-41: .clients.AsyncListenWebSocketClient imported but unused

Remove unused import

(F401)


67-71: Verify the correct handling of new clients and options.

Ensure that the methods correctly handle the new Listen and Speak related clients and options.

Tools
Ruff

67-67: .clients.ListenRESTOptions imported but unused

Remove unused import

(F401)


68-68: .clients.PrerecordedOptions imported but unused

Remove unused import

(F401)


69-69: .clients.PreRecordedStreamSource imported but unused

Remove unused import

(F401)


70-70: .clients.PrerecordedSource imported but unused

Remove unused import

(F401)


71-71: .clients.ListenRestSource imported but unused

Remove unused import

(F401)


100-103: Verify the correct handling of new clients and options.

Ensure that the methods correctly handle the new Listen and Speak related clients and options.

Tools
Ruff

100-100: .clients.SpeakRESTOptions imported but unused

Remove unused import

(F401)


101-101: .clients.SpeakWebSocketOptions imported but unused

Remove unused import

(F401)


103-103: .clients.SpeakRestSource imported but unused

Remove unused import

(F401)

deepgram/clients/listen/v1/rest/client.py (4)

44-44: Verify the correct handling of ListenRESTOptions.

Ensure that the ListenRESTOptions parameter is handled correctly, particularly the check method.


122-122: Verify the correct handling of ListenRESTOptions.

Ensure that the ListenRESTOptions parameter is handled correctly.


190-190: Verify the correct handling of ListenRESTOptions.

Ensure that the ListenRESTOptions parameter is handled correctly, particularly the check method.


270-270: Verify the correct handling of ListenRESTOptions.

Ensure that the ListenRESTOptions parameter is handled correctly.

deepgram/clients/listen/v1/rest/async_client.py (4)

44-44: Verify the correct handling of ListenRESTOptions.

Ensure that the ListenRESTOptions parameter is handled correctly, particularly the check method.


122-122: Verify the correct handling of ListenRESTOptions.

Ensure that the ListenRESTOptions parameter is handled correctly.


190-190: Verify the correct handling of ListenRESTOptions.

Ensure that the ListenRESTOptions parameter is handled correctly, particularly the check method.


269-269: Verify the correct handling of ListenRESTOptions.

Ensure that the ListenRESTOptions parameter is handled correctly.

deepgram/clients/listen/v1/websocket/client.py (1)

102-102: LGTM!

The addition of ListenWebSocketOptions and its validation logic are correct.

Also applies to: 118-118, 136-137

deepgram/clients/listen/v1/websocket/async_client.py (1)

95-95: LGTM!

The addition of ListenWebSocketOptions and its validation logic are correct.

Also applies to: 111-111, 129-130

@dvonthenen dvonthenen merged commit 40d1239 into deepgram:main Jul 11, 2024
3 checks passed
@dvonthenen dvonthenen deleted the missing-classes-in-init branch July 11, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants